package test;


import java.util.Arrays;

public class test {
    public static void main(String[] args) {
        String a;
        Person[] data = new Person[]{new Person(3),new Person(4),new Person(5)};
        Arrays.sort(data);
        System.out.println(Arrays.toString(data));
    }

}

class Person{
    int age;
    public Person( int age){
        this.age =age;
    }
}
